package com.springboot.controller.test;


import com.springboot.dao.UserLoginDao;
import com.springboot.entity.UserLoginEntity;
import com.springboot.jwt.interfaces.JwtToken;
import com.springboot.util.http.ResponseBuilder;
import com.springboot.util.http.ResultResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import jakarta.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zyj
 * @since 2021-03-17
 */
@RestController
@RequestMapping("/tenantDabaseInfo")
@Tag(name = "查询类")
public class TenantDabaseInfoController {

    @Resource
    UserLoginDao userLoginDao;

    @JwtToken
    @GetMapping("/queryTest")
    @Operation(description = "测试")
    public ResultResponse<UserLoginEntity> queryTest(@RequestHeader(value = "tenant",required = false) String tenant){
        UserLoginEntity userLoginEntity = userLoginDao.selectById(1);
        return ResponseBuilder.successData(userLoginEntity);
    }
}
